/*—————————————————————————————————————————————————————————— antd组件公共配置相关 ——————————————————————————————————————————————————————————*/

import color from '@/assets/style/global.module.scss' // 公共颜色
import { ThemeConfig } from 'antd'
import { SizeType } from 'antd/es/config-provider/SizeContext'

// antd组件库公共样式配置对象
export const configProvider: ThemeConfig = {
  token: {
    colorPrimary: color.themeColor,
    borderRadius: 6,
    colorText: color.fontColor,
    colorTextQuaternary: color.promptFontColor,
  },
  components: {
    Button: {
      colorPrimary: color.themeColor,
      algorithm: true,
    },
    Layout: {
      bodyBg: color.pageBg,
      footerBg: color.pageBg,
      headerBg: color.pageBg,
      siderBg: color.pageBg,
      triggerHeight: 77,
      headerHeight: 58.5,
    },
    Menu: {
      iconSize: 24,
      collapsedIconSize: 20,
      itemMarginBlock: 5,
      iconMarginInlineEnd: 8,
      itemBorderRadius: 15,
      itemBg: color.transparent,
      subMenuItemBg: color.transparent,
      itemHoverBg: color.hoverBg1,
      itemHoverColor: color.fontColor,
      itemColor: color.promptFontColor,
      itemHeight: 50,
      itemSelectedBg: color.white,
      itemSelectedColor: color.themeColor,
    },
    Breadcrumb: {
      iconFontSize: 24,
      itemColor: color.promptFontColor,
      lastItemColor: color.fontColor,
      linkColor: color.promptFontColor,
      linkHoverColor: color.themeColor,
    },
    Table:{
      borderColor:color.conventionBg1,
      headerColor:color.promptFontColor,
      headerBg:color.white,
      rowExpandedBg:color.white,
      cellPaddingInline:21,
      headerBorderRadius:15,
      rowHoverBg:color.hoverBg1,
      colorLinkHover:color.themeColor
    },
    Form: {
      labelColonMarginInlineEnd:12,
      labelColonMarginInlineStart:4,
      itemMarginBottom:16,
      labelFontSize:18,
      labelColor:color.fontColor
    },
  },
}

// antd组件公共配置中默认大小
export const componentSize :SizeType = 'middle'